home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / whati~gz.zoo / makefile < prev    next >
Makefile  |  1992-09-13  |  3KB  |  140 lines

  1. # makefile for whatis,whatisin,apropos
  2. #
  3. # version: 
  4. #
  5. # $Id$
  6. #
  7. # $Log$
  8. #
  9. # compiler (use second set for MiNT):
  10. SYSINC        = g:/mint/include
  11. SYSLIB        = g:/mint/lib
  12. SPECL        = -nostdlib $(SYSLIB)/crt0.o
  13. CC        = gcc -z -Wall -v -I$(SYSINC)
  14. LD        = gcc -z -Wall -v -L$(SYSLIB) $(SPECL)
  15. LIBS32        = -liio -lgnu
  16. LIBS16        = -liio16 -lgnu16
  17. USRLIBS        =
  18. # if -mshort, use LIBS16...
  19. LIBS        = $(USRLIBS) $(LIBS32)
  20.  
  21. # compile/link options:
  22. DEFS        = #-DCHECK_MAGIC
  23. OPT        = -O -fomit-frame-pointer
  24. DEBUG        = #-DDEBUG
  25. PROF        =
  26. # use -mshort for 16-bit version (make sure to change libs)
  27. ARCH        =
  28. MISC        =
  29. CFLAGS        = $(DEBUG) $(PROF) $(ARCH) $(MISC) $(OPT) $(DEFS)
  30. LDFLAGS        = $(DEBUG) $(PROF) $(ARCH) $(MISC)
  31.  
  32. # targets, etc:
  33. SECT        = 1
  34. SUBSECT        =
  35. TARG1        = whatis.ttp
  36. TARG2        = whatisin.ttp
  37. TARG3        = apropos.ttp
  38. TARGETS        = $(TARG1) $(TARG2) $(TARG3)
  39. FIXSTK1        = fixstk 16K
  40. FIXSTK2        = fixstk 16K
  41. FIXSTK3        = fixstk 16K
  42. GVERSION1    = gversion -v 2.0.1
  43. GVERSION2    = gversion -v 2.0.1
  44. GVERSION3    = gversion -v 2.0.1
  45.  
  46. # commands used here:
  47. NROFF        = nroff
  48. NRFLAGS        = -manx -T -rO1
  49. ECHO        = echo
  50. CP        = cp -p
  51. COMPRESS    = compress
  52. RM        = rm -f
  53.  
  54. # headers, sources, and objects:
  55. HEADERS        = whatis.h
  56. SRCS1        = whatis.c
  57. SRCS2        = whatisin.c
  58. SRCS3        = apropos.c
  59. COMSRC        = common.c
  60. SRCS        = $(SRCS1) $(SRCS2) $(SRCS3) $(COMSRC)
  61. OBJS1        = whatis.o
  62. OBJS2        = whatisin.o
  63. OBJS3        = apropos.o
  64. COMOBJ        = common.o
  65. OBJS        = $(OBJS1) $(OBJS2) $(OBJS3) $(COMOBJ)
  66.  
  67.  
  68.  
  69. # distribution files (add others as needed):
  70. OTHERS        = readme makefile $(MANSRC) todo
  71. DISTFILES    = $(OTHERS) $(SRCS) $(HEADERS)
  72. LOG        = compile.err
  73.  
  74. # install directories, etc:
  75. BINDIR        = g:/gnu/bin
  76. MANDIR        = d:/usr/man/man$(SECT)
  77.  
  78. # for test target:
  79. RUNPARM        =
  80. RUNOUT        =
  81.  
  82.  
  83.  
  84. # directions...
  85. #
  86. directions:
  87.         @$(ECHO) type make all to built $(TARGETS)
  88.         @$(ECHO) type make clean to remove objects
  89.         @$(ECHO) type make clobber to remove objects and $(TARGETS)
  90.  
  91.  
  92. # main target (make all)...
  93. #
  94. all:        $(TARGETS) mkwhatis.ttp
  95.  
  96.  
  97. $(TARG1):    $(COMOBJ) $(OBJS1)
  98.         $(LD) $(LDFLAGS) -o $(TARG1) $(OBJS1) $(COMOBJ) $(LIBS)
  99.         $(FIXSTK1) $(TARG1)
  100. #        $(GVERSION1) $(TARG1)
  101.         @$(ECHO) done making $(TARG1)
  102.  
  103. $(TARG2):    $(COMOBJ) $(OBJS2)
  104.         $(LD) $(LDFLAGS) -o $(TARG2) $(OBJS2) $(COMOBJ) $(LIBS)
  105.         $(FIXSTK2) $(TARG2)
  106. #        $(GVERSION2) $(TARG2)
  107.         @$(ECHO) done making $(TARG2)
  108.  
  109. $(TARG3):    $(COMOBJ) $(OBJS3)
  110.         $(LD) $(LDFLAGS) -o $(TARG3) $(OBJS3) $(COMOBJ) $(LIBS)
  111.         $(FIXSTK3) $(TARG3)
  112. #        $(GVERSION3) $(TARG3)
  113.         @$(ECHO) done making $(TARG3)
  114.  
  115.  
  116.  
  117. mkwhatis.ttp:    mkwhatis.o
  118.         $(LD) $(LDFLAGS) -o mkwhatis.ttp mkwhatis.o $(LIBS)
  119.         fixstk 16K mkwhatis.ttp
  120.         gversion -v 2.0.1 mkwhatis.ttp
  121.  
  122.  
  123. # others...
  124. #
  125. clean:
  126.         $(RM) $(OBJS) $(LOG)
  127.  
  128. clobber:    clean
  129.         $(RM) $(TARGETS)
  130.  
  131.  
  132.  
  133. # dependencies...
  134. #
  135. $(COMOBJ):    $(HEADERS)
  136. $(OBJS1):    $(HEADERS)
  137. $(OBJS2):    $(HEADERS)
  138. $(OBJS3):    $(HEADERS)
  139.  
  140.